<template>
	<view class="top-container">
		<view class="top-left-container">
			<image class="top-left-image" src="../../static/icon_home_top.png"></image:>
			<view class="top-left-title">{{$t('language.pageTitle')}}</view>
		</view>
		<view class="top-right-container">
			<view class="chinese" :class="chooselan===0?'select':''" @click="pickerlan(0)">简体中文</view>
			<view class="divider"></view>
			<view class="english" :class="chooselan===1?'select':''" @click="pickerlan(1)">English</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				chooselan:0
			}
		},
		methods: {
			pickerlan(i){
				this.chooselan=i
				this.$emit('pickerlan',i)
			}
		}
	}
</script>

<style>
	.top-container {
		width: 100%;
		display: flex;
		flex-direction: row;
		align-items: center;
		justify-content: space-between;
		padding-top: 30rpx;
		padding-bottom: 30rpx;
		background: #FFFFFF;
		box-shadow: 0px 2px 8px 0px rgba(0,21,41,0.1200);
	}
	.top-left-container {
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-left: 482rpx;
	}
	.top-left-image {
		width: 66rpx;
		height: 58rpx;
	}
	.top-left-title {
		font-size: 36rpx;
		font-family: PingFangSC-Medium, PingFang SC;
		font-weight: 500;
		color: #000000;
		margin-left: 20rpx;
	}
	.top-right-container {
		display: flex;
		flex-direction: row;
		align-items: center;
		margin-right: 64rpx;
	}
	.chinese {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(0,0,0,0.6500);
	}
	.select{color: #4185FF!important;}
	.divider {
		width: 1rpx;
		height: 28rpx;
		background:#CCCCCC;
		margin-left: 32rpx;
		margin-right: 32rpx;
	}
	.english {
		font-size: 28rpx;
		font-family: PingFangSC-Regular, PingFang SC;
		font-weight: 400;
		color: rgba(0,0,0,0.6500);
	}
</style>